package com.study.spring;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class Dogs {
    @Bean(name = {"use1","use2"})
    public Dog dog() {
        Dog dog = new Dog();
        dog.setId(1);
        dog.setName("小白");
        dog.setContent("汪汪汪!");
        return dog;
    }

    public void hello() {
        System.out.println("Hello Dogs");
    }
}
